package com.whxd.system.user.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping(value = "/login")
public class LoginController {

	@RequestMapping(method = RequestMethod.GET)
	public String login(HttpServletRequest request, HttpServletResponse response) {

		if (StringUtils.isNotBlank(request.getParameter("need")) || StringUtils.isNotBlank(request.getParameter("error"))) {
			response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
		}

		return "common/login";

	}

}
